package org.example.finalsecurities.task;

import lombok.extern.slf4j.Slf4j;
import org.example.finalsecurities.service.FlowInfoService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 爬取港股通资金流任务
 *
 * @author : [CaiJianbin]
 * @version : [v1.0]
 */
@Component
@Slf4j
public class CrawlFlowInfoJob implements Job {
    @Autowired
    private FlowInfoService flowInfoService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        flowInfoService.insertFlowInfo();
        log.info("成功爬取港股通资金流");
    }
}
